package com.wetalk.api.dto;


import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class usersResult {
    private Integer code;//响应码, 1代表成功;0代表失败
    private String msg;//应信息描述
    private Object data;//返回的数据
    public static usersResult success(){//增删改成功响应
        return new usersResult(1, "success", null);
    }
    public static usersResult success(Object data){//查询成功响应
        return new usersResult(1, "success", data);
    }
    public static usersResult error(String msg){//失败响应
        return new usersResult(0, msg, null);
    }
}